<?php

	/**
	* 
	*/
	class Question_model extends CI_Model
	{
		function __construct()
		{
			$this->load->database();
		}
		/*根据活动id取所有问题*/
		function getAnsInfo($iActId)
		{
			$query = $this->db->query("SELECT * FROM `question` WHERE `iActId` = $iActId ORDER BY `iQuizNo` ASC ");
			return $query->result_array();
		}
		/*插入一个问题*/
		/*$data数组要包括，活动id，问题种类，选项*/
		function insertAns($data)
		{
			$this->db->insert('question',$data);
		}
	}